package com.gitee.c0dehvb.reactive.sample.r2dbc.metadata;

import io.r2dbc.spi.ConnectionFactory;
import org.apache.shardingsphere.core.rule.ShardingRule;
import org.apache.shardingsphere.sql.parser.binder.metadata.schema.SchemaMetaData;
import org.springframework.r2dbc.core.DatabaseClient;

/**
 * @author LiYilin
 * @since 2022/6/2 10:36 AM
 **/
public interface R2dbcSchemaMetaDataLoader {
    /**
     * 加载数据源元数据
     * @param rule
     * @param maxConnectionCount
     * @param connectionFactory
     * @return
     */
    SchemaMetaData load(ShardingRule rule, int maxConnectionCount, ConnectionFactory connectionFactory);
}
